<%@ page language="java" isELIgnored="false" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<%@ include file="/WEB-INF/jsp/ResourceGlobal.jsp"%>
<html>

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script type="text/javascript" src="<%=context%>resources/modules/system/sys/menu/menu.create.js?r=<%=Math.random()%>"></script>
<script type="text/javascript">
	
</script>
</head>

<body class="sub-page">
	<title>新增</title>
	<!-- 系列产品新建模态窗 -->
	<form id="menuAddForm" role="form" class="form-horizontal" method="post" action="<%=context%>sys/menu/saveMenu.do">
		<input type="hidden" name="status" id="status" value="1">
		<!-- 如果将表单禁用，就给fieldset添加disabled属性 -->
		<fieldset>

			<div class="page-content">
				<div class="page-header">
					<h4 class="page-title">新增</h4>
				</div>
				<div class="page-body">
					<div class="form-group">
						<label class="col-sm-2 control-label">复制</label>
						<div class="col-sm-4">
							<input type="hidden" name="copyMenuId" id="copyMenuId" value="">
							<div class="input-group">
								<select type="text" name="srcMenuId" id="srcMenuId"></select>
								<p class="input-group-btn">
									<button type="button" class="btn btn-primary" name="btnCopyMenu" onclick="copyMenu();">复制</button>
								</p>
							</div>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">名称<span class="text-danger">*</span></label>
						<div class="col-sm-10 form-inner">
							<input type="text" placeholder="请输入名称" class="form-control" name="name" id="name" value="" />
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">链接<span class="text-danger">*</span></label>
						<div class="col-sm-10 form-inner">
							<input type="text" placeholder="请输入链接" class="form-control" name="url" id="url" value="" />
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">图标</label>
						<div class="col-sm-10 form-inner">
							<input type="text" placeholder="请输入图标" class="form-control" name="icon" id="icon" value="" />
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">序号<span class="text-danger">*</span></label>
						<div class="col-sm-10 form-inner">
							<input type="text" placeholder="请输入序号" class="form-control" name="sequence" id="sequence" value="${sequence}" />
						</div>
					</div>
					
					<div class="form-group">
						<label class="col-sm-2 control-label">类型</label>
						<div class="col-sm-10 form-inner">
							<select name="type" id="type" class="form-control use-select2" >
								<option value="0">普通菜单</option>
								<option value="1">普通按钮</option>
								<option value="2">其他权限</option>
							</select>
						</div>
					</div>
					
					<div class="form-group">
						<label class="col-sm-2 control-label">所属系统</label>
						<div class="col-sm-10 form-inner">
							<select name="belongSystem" id="belongSystem" class="form-control use-select2" >
								<option value=""></option>
								<option value="SOLUTION_BIS">solution门户</option>
								<option value="SOLUTION_SYS">solution管理系统</option>
							</select>
						</div>
					</div>
					
					<div class="form-group" id="parentMenu" style="display: none;">
						<label class="col-sm-2 control-label">父菜单</label>
						<div class="col-sm-10 form-inner">
							<select name="parentId" id="parentId" class="form-control use-select2" >
								<%-- <option value="0">无</option>
								<c:forEach var="obj" items="${rootMenu }">
									<option value="${obj.menuId }">${obj.name }</option>
									<c:forEach var="o" items="${obj.childs }">
										<option value="${o.menuId }">|-&nbsp;${o.name }</option>
										<c:forEach var="c" items="${o.childs }">
											<option value="${c.menuId }">&nbsp;&nbsp;&nbsp;|--&nbsp;${c.name }</option>
										</c:forEach>
									</c:forEach>
								</c:forEach> --%>
							</select>
						</div>
					</div>
					<div class="form-group"  id="descGroup" >
						<label class="col-sm-2 control-label">描述<span class="text-danger">*</span></label>
						<div class="col-sm-10 form-inner">
							<input type="text" placeholder="请输入描述" class="form-control" name="desc" id="desc" value="" />
						</div>
					</div>
					<div class="form-group"  id="codeGroup">
						<label class="col-sm-2 control-label">代码<span class="text-danger">*</span></label>
						<div class="col-sm-10 form-inner">
							<input type="text" placeholder="请输入代码" class="form-control" name="code" id="code" value="" />
						</div>
					</div>
				</div>
				<div class="page-footer">
					<button type="button" class="btn btn-primary btn-save btn-loading btn-w-xs" data-loading-text="<i class='ico-loading'></i>" onclick="submitMenuAddForm();">提交</button>
					<button type="button" class="btn btn-link btn-w-xs" onclick="window.close();">取消</button>
				</div>
			</div>
		</fieldset>
	</form>

</body>